<template>
  <div>
    <ul class="course_type_list" >
      <li  v-for="courseend in this.$store.state.courseends ">
        <div class="box">
          <img :src="courseend.img_source" alt="">
          <div class="info">
            <h4><a href="#">{{courseend.name}}</a></h4>
            <span class="duration">共{{ Math.ceil((Date.parse(courseend.end)-Date.parse(courseend.start))/1000/60/60/24/7) }}周</span>
          </div>
          <div class="tinfo">
            <ul class="nav_horizontal">
              <li class="uimg">
                <img :src="courseend.teacher.image" alt="">
              </li>
              <li class="username">{{courseend.teacher.nickname}}</li>
              <li class="visitedicon"><font-awesome-icon :icon="['far', 'eye']"></font-awesome-icon></li>
              <li class="visitednum">{{courseend.visitednum>10000?(((courseend.visitednum-courseend.visitednum%1000)/10000+'W')):(courseend.visitednum)}}</li>
              <li class="praisedicon"><font-awesome-icon :icon="['far', 'thumbs-up']"></font-awesome-icon></li>
              <li class="praisednum">{{courseend.praisednum>10000?(((courseend.praisednum-courseend.praisednum%1000)/10000+'W')):(courseend.praisednum)}}</li>
            </ul>
          </div>
          <hr>
          <div class="dinfo">
            <span class="ing">已结束</span>
            <span class="">成绩：</span>
            <span class="">89</span>
            <span class="">分</span>
            <el-button type="success" plain class="button" @click="courselook()">查看</el-button>
          </div>
        </div>
      </li>
    </ul>
  </div>
</template>

<script>
export default {
  name: "studentcoursecourseend",
  data(){
    return{
      courseends:[],
      student:{}
    }
  },
  created() {
    this.courseends = this.$store.state.courseends;
    this.student = this.$store.state.student;
  },
  methods:{
    courselook(){

    }
  }
}
</script>

<style scoped>
@import "../../assets/css/course.css";
@import "../../assets/css/student.css";

</style>
